import React from 'react'
import { NavBar, Space, Toast } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'

export default function NavBars(props) {
    const navigate = useNavigate()
    // 导航栏操作
    const back = () => {
        navigate(-1)
    }

    return (
        <NavBar onBack={back} 
        style={{height:'50px',lineHeight:'50px',backgroundColor:'white',position:'fixed',top:"0px",width:'100%',zIndex:'100'}}
        >{props.name}</NavBar>
    )
}
